Integrand size = 19, antiderivative size = 123 \[ \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx=-\frac {d x}{c (b c-a d) n \left (c+d x^n\right )}+\frac {b^2 x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {b x^n}{a}\right )}{a (b c-a d)^2}+\frac {d (b c (1-2 n)-a d (1-n)) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {d x^n}{c}\right )}{c^2 (b c-a d)^2 n} \]
-d*x/c/(-a*d+b*c)/n/(c+d*x^n)+b^2*x*hypergeom([1, 1/n],[1+1/n],-b*x^n/a)/a /(-a*d+b*c)^2+d*(b*c*(1-2*n)-a*d*(1-n))*x*hypergeom([1, 1/n],[1+1/n],-d*x^ n/c)/c^2/(-a*d+b*c)^2/n
Time = 0.20 (sec) , antiderivative size = 121, normalized size of antiderivative = 0.98 \[ \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx=\frac {x \left (b^2 c^2 n \left (c+d x^n\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {b x^n}{a}\right )+a d \left (c (-b c+a d)+(a d (-1+n)+b (c-2 c n)) \left (c+d x^n\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {d x^n}{c}\right )\right )\right )}{a c^2 (b c-a d)^2 n \left (c+d x^n\right )} \]
(x*(b^2*c^2*n*(c + d*x^n)*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^ n)/a)] + a*d*(c*(-(b*c) + a*d) + (a*d*(-1 + n) + b*(c - 2*c*n))*(c + d*x^n )*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^n)/c)])))/(a*c^2*(b*c - a*d)^2*n*(c + d*x^n))
Time = 0.31 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.15, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {931, 1020, 778}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx\) |
\(\Big \downarrow \) 931 |
\(\displaystyle \frac {\int \frac {b d (1-n) x^n+b c n+a (d-d n)}{\left (b x^n+a\right ) \left (d x^n+c\right )}dx}{c n (b c-a d)}-\frac {d x}{c n (b c-a d) \left (c+d x^n\right )}\) |
\(\Big \downarrow \) 1020 |
\(\displaystyle \frac {\frac {b^2 c n \int \frac {1}{b x^n+a}dx}{b c-a d}-\frac {d (a d (1-n)-b (c-2 c n)) \int \frac {1}{d x^n+c}dx}{b c-a d}}{c n (b c-a d)}-\frac {d x}{c n (b c-a d) \left (c+d x^n\right )}\) |
\(\Big \downarrow \) 778 |
\(\displaystyle \frac {\frac {b^2 c n x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {b x^n}{a}\right )}{a (b c-a d)}-\frac {d x (a d (1-n)-b (c-2 c n)) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {d x^n}{c}\right )}{c (b c-a d)}}{c n (b c-a d)}-\frac {d x}{c n (b c-a d) \left (c+d x^n\right )}\) |
-((d*x)/(c*(b*c - a*d)*n*(c + d*x^n))) + ((b^2*c*n*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])/(a*(b*c - a*d)) - (d*(a*d*(1 - n) - b*( c - 2*c*n))*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^n)/c)])/(c*( b*c - a*d)))/(c*(b*c - a*d)*n)
3.4.3.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F 1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, n, p}, x] && !IGtQ[p , 0] && !IntegerQ[1/n] && !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p] || GtQ[a, 0])
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Simp[1/(a*n*(p + 1)*(b*c - a*d)) Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomialQ[a, b, c, d, n, p, q, x]
Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^( n_))), x_Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^n), x], x ] - Simp[(d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^n), x], x] /; FreeQ[{a, b , c, d, e, f, n}, x]
\[\int \frac {1}{\left (a +b \,x^{n}\right ) \left (c +d \,x^{n}\right )^{2}}d x\]
\[ \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx=\int { \frac {1}{{\left (b x^{n} + a\right )} {\left (d x^{n} + c\right )}^{2}} \,d x } \]
Exception generated. \[ \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx=\text {Exception raised: HeuristicGCDFailed} \]
\[ \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx=\int { \frac {1}{{\left (b x^{n} + a\right )} {\left (d x^{n} + c\right )}^{2}} \,d x } \]
b^2*integrate(1/(a*b^2*c^2 - 2*a^2*b*c*d + a^3*d^2 + (b^3*c^2 - 2*a*b^2*c* d + a^2*b*d^2)*x^n), x) - (b*c*d*(2*n - 1) - a*d^2*(n - 1))*integrate(1/(b ^2*c^4*n - 2*a*b*c^3*d*n + a^2*c^2*d^2*n + (b^2*c^3*d*n - 2*a*b*c^2*d^2*n + a^2*c*d^3*n)*x^n), x) - d*x/(b*c^3*n - a*c^2*d*n + (b*c^2*d*n - a*c*d^2* n)*x^n)
\[ \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx=\int { \frac {1}{{\left (b x^{n} + a\right )} {\left (d x^{n} + c\right )}^{2}} \,d x } \]
Timed out. \[ \int \frac {1}{\left (a+b x^n\right ) \left (c+d x^n\right )^2} \, dx=\int \frac {1}{\left (a+b\,x^n\right )\,{\left (c+d\,x^n\right )}^2} \,d x \]